The serotonergic system impacts a wide range of human behaviors and is a common target of psychiatric drugs. In mammals, neural circuits that receive serotonergic inputs are composed of diverse cell types, each of which expresses a subset of 14 distinct serotonin (5-HT) receptors. The impact of 5-HT release on circuit function involves the coordinated activation of many receptor types in distinct neurons. However, we do not yet understand the fundamental principles by which 5-HT acts at many sites within a circuit to coherently alter circuit function. Here, we propose to resolve this question in C. elegans. The C. elegans nervous system is particularly attractive for whole-circuit questions in neuroscience because it consists of exactly 302 neurons, every neuron can be identified in every animal, the synaptic connections between these neurons (the ?connectome?) have been fully defined, and excellent genetic tools can be used to manipulate single cells in this well-defined system. Moreover, this animal?s transparency allows us to use cutting-edge imaging approaches ? including whole-brain calcium imaging ? to monitor neural activity in freely-behaving animals. Importantly, 5-HT signaling is well- conserved from C. elegans to mammals: C. elegans orthologs of human genes encode for 5-HT synthesis enzymes (TPH), vesicular and membrane transporters (VMAT, SERT), 5-HT receptors (5-HT1, 5-HT2, etc) and more. Thus, studies of this animal should reveal general principles of 5-HT function that can be subsequently applied to more complex animals. The studies in this proposal build off recently published work from my lab and new preliminary data. In a recent study, we found that food ingestion by C. elegans activates a specific 5-HTergic neuron, called NSM, whose release of 5-HT drives slow locomotion while animals feed. We also showed that this neuron?s dynamical response to food ingestion controls locomotion dynamics: different patterns of 5-HT release drive different locomotion changes. In new preliminary data, we have systematically examined how patterned 5-HT release impacts locomotion, begun mapping out the 5-HT receptors that mediate these effects, and developed an approach to monitor 5-HT-induced changes in whole-brain activity. In the current proposal, we will use this well-constrained experimental paradigm and these cutting-edge imaging approaches to probe the functional architecture of the 5-HT system and examine how 5-HT receptors interact to control brain function. Specifically, we will first map out the 5-HT receptors and circuits that mediate behavioral responses to different patterns of 5-HT release (Aim 1). In a second aim, we will use new calcium imaging approaches to determine how different patterns of 5-HT release engage different 5-HT receptor types to alter whole-brain activity (Aim 2). Finally, we will also examine how aversive cues that antagonize 5-HT signaling modulate the function of serotonergic circuits, allowing animals to balance aversive and appetitive inputs (Aim 3). These studies will reveal how patterned 5-HT release engages specific 5-HT receptor types to impact brain function, yielding a new framework for 5-HT circuit organization and function.